/**
 * 
 */
package entity;

import utils.ReferenceType;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * 
 * @author Hung
 * @since 06/03/2012
 * 
 */

@DatabaseTable
public class Reference {
	
	@DatabaseField(generatedId=true)
	private int id;
	
	@DatabaseField
	private String name;
	
	@DatabaseField
	private String url;
	
	@DatabaseField
	private ReferenceType type;
	
	@DatabaseField(canBeNull=false, foreign=true, defaultValue="1")
	private Account account;
	
	Reference() {
		
	}
	
	public Reference(String name, String url, ReferenceType type, Account account) {
		this.name = name;
		this.url = url;
		this.type = type;
		this.account = account;
	}
	
	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}
	public int getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public ReferenceType getType() {
		return type;
	}
	public void setType(ReferenceType type) {
		this.type = type;
	}
}
